Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch Docker images to UBI #6427

Merged

Conversation

pkoutsovasilis
Copy link
Contributor

@pkoutsovasilis pkoutsovasilis commented Dec 23, 2024

What does this PR do?

This PR replaces the default Ubuntu-based Docker images for Elastic-Agent with UBI-minimal-based images. It updates the packaging files, Docker templates, and configuration to ensure compatibility with UBI-minimal images. The -ubi suffixed images are not removed to maintain compatibility with the unified-release and ECK. In the image below is shown that the elastic-agent and elastic-agent-ubi have the same hash

image

Why is it important?

Switching to UBI-minimal-based images reduces the overall footprint of the Elastic-Agent Docker images and improves compliance with enterprise standards.

Checklist

  • My code follows the style guidelines of this project
  • I have made corresponding changes to the documentation
  • I have made corresponding changes to the default configuration files
  • I have added an entry in ./changelog/fragments using the changelog tool

Disruptive User Impact

The changes should not cause any disruption for most users, as functionality is preserved. However, users relying on Ubuntu-specific dependencies in custom configurations or extensions may need to adjust their setups to ensure compatibility with UBI-minimal.

How to test this PR locally

SNAPSHOT=true PACKAGES=docker PLATFORMS="linux/arm64" EXTERNAL=true mage package

Related issues

N/A

@pkoutsovasilis pkoutsovasilis added the Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team label Dec 23, 2024
@pkoutsovasilis pkoutsovasilis self-assigned this Dec 23, 2024
Copy link
Contributor

mergify bot commented Dec 23, 2024

This pull request does not have a backport label. Could you fix it @pkoutsovasilis? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-./d./d is the label to automatically backport to the 8./d branch. /d is the digit

Copy link
Contributor

mergify bot commented Dec 23, 2024

backport-v8.x has been added to help with the transition to the new branch 8.x.
If you don't need it please use backport-skip label and remove the backport-8.x label.

@mergify mergify bot added the backport-8.x Automated backport to the 8.x branch with mergify label Dec 23, 2024
@pkoutsovasilis pkoutsovasilis force-pushed the container_ubuntu_to_wolfi branch 2 times, most recently from 9468df4 to b1d8da5 Compare December 23, 2024 14:06
@pkoutsovasilis pkoutsovasilis marked this pull request as ready for review December 24, 2024 15:21
@pkoutsovasilis pkoutsovasilis requested a review from a team as a code owner December 24, 2024 15:21
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@pkoutsovasilis pkoutsovasilis marked this pull request as draft December 27, 2024 03:43
@pkoutsovasilis pkoutsovasilis force-pushed the container_ubuntu_to_wolfi branch from 7dc5f5d to c7663c2 Compare December 31, 2024 10:27
@pkoutsovasilis pkoutsovasilis marked this pull request as ready for review December 31, 2024 12:41
@jlind23 jlind23 added backport-skip and removed backport-8.x Automated backport to the 8.x branch with mergify labels Jan 2, 2025
@jlind23
Copy link
Contributor

jlind23 commented Jan 2, 2025

Removing backport label as this change should remain on main.

# - security: impacts on the security of a product or a user’s deployment.
# - upgrade: important information for someone upgrading from a prior version
# - other: does not fit into any of the other categories
kind: feature
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we want to mark it as a breaking change? While technically this probably is not a breaking change, changing the base image from Ubuntu (based on Debian and deb packages) to UBI (based on Red Hat and rpm packages) is quite significant.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @andrzej-stencel this is more than a valid point! Evidently when I did the initial "assessment" in my head I perceived this as a more lightweight change, but reading again your point I agree 100%. I just pushed a commit marking this PR as a breaking change 🙂

@pkoutsovasilis pkoutsovasilis requested a review from rdner January 3, 2025 06:18
@pkoutsovasilis
Copy link
Contributor Author

@rdner since you have went through the same process for the wolfi-based images I would really appreciate you having a look on this PR 🙂

@michalpristas michalpristas added the chore Tasks that just need to be done, they are neither bug, nor enhancements label Jan 3, 2025
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

Copy link
Member

@rdner rdner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good to me, I'm ready to approve once I get the confirmation that the UBI-based complete image is tested.

@pkoutsovasilis pkoutsovasilis merged commit 181c0c8 into elastic:main Jan 8, 2025
13 checks passed
@pkoutsovasilis pkoutsovasilis deleted the container_ubuntu_to_wolfi branch January 8, 2025 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-skip chore Tasks that just need to be done, they are neither bug, nor enhancements Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants